home *** CD-ROM | disk | FTP | other *** search
/ Spiceworld The Movie - Interactive CD-ROM / Spiceworld The Movie: Interactive CD-ROM.iso / pc / elements / spicetwo.dir / scripts_61.ls < prev    next >
Encoding:
Text File  |  1997-12-04  |  2.2 KB  |  69 lines

  1. on sportyMaze
  2.   global MAZEH, MAZEV, MAZEBINARY
  3.   repeat while the mouseMember = member "maze mask"
  4.     if (the mouseH > (the locH of sprite 60 + 7)) and (char (MAZEH * 2) - 1 of line MAZEV of MAZEBINARY = 0) then
  5.       moveMaze("rtMazeCur", "horizontal", 1)
  6.       next repeat
  7.     end if
  8.     if (the mouseH < (the locH of sprite 60 - 7)) and (char (MAZEH * 2) - 3 of line MAZEV of MAZEBINARY = 0) then
  9.       moveMaze("leftMazeCur", "horizontal", -1)
  10.       next repeat
  11.     end if
  12.     if (the mouseV > (the locV of sprite 60 + 7)) and (char MAZEH * 2 of line MAZEV of MAZEBINARY = 0) then
  13.       moveMaze("downMazeCur", "vertical", 1)
  14.       next repeat
  15.     end if
  16.     if (the mouseV < (the locV of sprite 60 - 7)) and (char MAZEH * 2 of line MAZEV - 1 of MAZEBINARY = 0) then
  17.       moveMaze("upMazeCur", "vertical", -1)
  18.       next repeat
  19.     end if
  20.     puppetSound(0)
  21.   end repeat
  22.   puppetSound(0)
  23. end
  24.  
  25. on moveMaze spriteCursor, horOrVert, offset
  26.   global MAZEH, MAZEV, MAZEREVEALS, MAZEBINARY, PRINTLIST
  27.   puppetSound("maze ball")
  28.   set the cursor of sprite 2 to 2
  29.   set speed to 2
  30.   set firstSprite to 3
  31.   set horizontal to horOrVert = "horizontal"
  32.   if horizontal then
  33.     set MAZEH to MAZEH + offset
  34.   else
  35.     set MAZEV to MAZEV + offset
  36.   end if
  37.   repeat with x = 1 to 14 / speed
  38.     if offset = -1 then
  39.       set turnX to (14 / speed) - x + 1
  40.     else
  41.       set turnX to x
  42.     end if
  43.     if horizontal then
  44.       set the locH of sprite 60 to the locH of sprite 60 + (speed * offset)
  45.       set the member of sprite 60 to "top" && turnX
  46.     else
  47.       set the locV of sprite 60 to the locV of sprite 60 + (speed * offset)
  48.       set the member of sprite 60 to "left" && turnX
  49.     end if
  50.     updateStage()
  51.   end repeat
  52.   set testLoc to string(MAZEH & "/" & MAZEV)
  53.   repeat with x = 0 to 5
  54.     if (testLoc = item x + 1 of "8/3,2/17,2/4,15/6,10/16,2/2") and (MAZEREVEALS = x) then
  55.       set MAZEREVEALS to x + 1
  56.       puppetSound("twink")
  57.       set the visible of sprite (x + firstSprite) to 1
  58.       updateStage()
  59.       if x = 5 then
  60.         set the cursor of sprite 2 to 0
  61.         put "sporty spice print" & RETURN after PRINTLIST
  62.         congratulations()
  63.         returnToMainGame(the frameLabel)
  64.       end if
  65.     end if
  66.   end repeat
  67.   updateStage()
  68. end
  69.